A microcontroller is usually contained on a single integrated circuit, and is often intended to operate as an embedded system. In addition to a processing unit (e.g., a CPU), a microcontroller typically contains a small amount of random access memory (RAM), programmable read only memory (PROM), timers, and I/O ports. RAM is often in very short supply in embedded microcontroller applications. Often, it is limited to amounts in the 32 to 256 byte range.
Microcontrollers are often used to perform complex tasks in an information handling system. For example, a microcontroller may be used as a service processor for environmental monitoring within the system, early power off warning, error log analysis, etc. Microcontrollers are also used for data acquisition and control of subsystems, motion devices, input devices, display devices, instrumentation devices, etc.
Many software programs, including those written as embedded microcontroller applications, require that some type of permission or authority be acquired, before a memory location is modified. Usually, some type of permission variable is used to indicate that another variable, such as a data variable, may be updated. For example, before updating a counter, the application program checks a permission indicator variable. If the permission indicator variable is set to a certain value, the counter may be modified. If, however, the permission indicator variable is set to another value, the counter may not be modified.
Permission indicator variables can use a great deal of RAM. RAM is consumed for every memory area (e.g., the counters described above), and for each permission variable associated with the memory areas. In a typical processor, this is usually not a problem. However, in a microcontroller, where RAM is typically in short supply, this can be an overwhelming problem. Conserving even a small amount of RAM can make a major difference in the functionality of an embedded microcontroller application.
Consequently, it would be desirable to have a system and method for conserving RAM in an embedded microcontroller application. It would be desirable to have a permission, or locking, system for memory areas (i.e. variables) that does not consume valuable RAM space.